home *** CD-ROM | disk | FTP | other *** search
/ Risc World 5 / Risc World 5.iso / SOFTWARE / Issue3 / Games / xrick / !xrick / src / c / game < prev    next >
Text File  |  2004-06-24  |  14KB  |  790 lines

  1. /*
  2.  * xrick/src/game.c
  3.  *
  4.  * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). All rights reserved.
  5.  *
  6.  * The use and distribution terms for this software are contained in the file
  7.  * named README, which can be found in the root of this distribution. By
  8.  * using this software in any fashion, you are agreeing to be bound by the
  9.  * terms of this license.
  10.  *
  11.  * You must not remove this notice, or any other, from this software.
  12.  */
  13.  
  14. #include <stdlib.h>
  15.  
  16. #include "system.h"
  17. #include "config.h"
  18. #include "game.h"
  19.  
  20. #include "draw.h"
  21. #include "maps.h"
  22. #include "ents.h"
  23. #include "e_rick.h"
  24. #include "e_sbonus.h"
  25. #include "e_them.h"
  26. #include "screens.h"
  27. #include "rects.h"
  28. #include "scroller.h"
  29. #include "control.h"
  30. #include "data.h"
  31.  
  32. #ifdef ENABLE_DEVTOOLS
  33. #include "devtools.h"
  34. #endif
  35.  
  36.  
  37. /*
  38.  * local typedefs
  39.  */
  40. typedef enum {
  41. #ifdef ENABLE_DEVTOOLS
  42.   DEVTOOLS,
  43. #endif
  44.   XRICK,
  45.   INIT_GAME, INIT_BUFFER,
  46.   INTRO_MAIN, INTRO_MAP,
  47.   PAUSE_PRESSED1, PAUSE_PRESSED1B, PAUSED, PAUSE_PRESSED2,
  48.   PLAY0, PLAY1, PLAY2, PLAY3,
  49.   CHAIN_SUBMAP, CHAIN_MAP, CHAIN_END,
  50.   SCROLL_UP, SCROLL_DOWN,
  51.   RESTART, GAMEOVER, GETNAME, EXIT
  52. } game_state_t;
  53.  
  54.  
  55. /*
  56.  * global vars
  57.  */
  58. U8 game_period = 0;
  59. U8 game_waitevt = FALSE;
  60. rect_t *game_rects = NULL;
  61.  
  62. U8 game_lives = 0;
  63. U8 game_bombs = 0;
  64. U8 game_bullets = 0;
  65. U32 game_score = 0;
  66.  
  67. U16 game_map = 0;
  68. U16 game_submap = 0;
  69.  
  70. U8 game_dir = 0;
  71. U8 game_chsm = FALSE;
  72.  
  73. U8 game_cheat1 = 0;
  74. U8 game_cheat2 = 0;
  75. U8 game_cheat3 = 0;
  76.  
  77. #ifdef GFXST
  78. hscore_t game_hscores[8] = {
  79.   { 8000, "SIMES@@@@@" },
  80.   { 7000, "JAYNE@@@@@" },
  81.   { 6000, "DANGERSTU@" },
  82.   { 5000, "KEN@@@@@@@" },
  83.   { 4000, "ROB@N@BOB@" },
  84.   { 3000, "TELLY@@@@@" },
  85.   { 2000, "NOBBY@@@@@" },
  86.   { 1000, "JEZEBEL@@@" }
  87. };
  88. #endif
  89. #ifdef GFXPC
  90. hscore_t game_hscores[8] = {
  91.   { 8000, "DANGERSTU@" },
  92.   { 7000, "SIMES@@@@@" },
  93.   { 6000, "KEN@T@ZEN@" },
  94.   { 5000, "BOBBLE@@@@" },
  95.   { 4000, "GREG@LAA@@" },
  96.   { 3000, "TELLY@@@@@" },
  97.   { 2000, "CHIGLET@@@" },
  98.   { 1000, "ANDYSPLEEN" }
  99. };
  100. #endif
  101. #ifdef ENABLE_SOUND
  102. sound_t *WAV_GAMEOVER;
  103. sound_t *WAV_SBONUS2;
  104. sound_t *WAV_BULLET;
  105. sound_t *WAV_BOMBSHHT;
  106. sound_t *WAV_EXPLODE;
  107. sound_t *WAV_STICK;
  108. sound_t *WAV_WALK;
  109. sound_t *WAV_CRAWL;
  110. sound_t *WAV_JUMP;
  111. sound_t *WAV_PAD;
  112. sound_t *WAV_BOX;
  113. sound_t *WAV_BONUS;
  114. sound_t *WAV_SBONUS1;
  115. sound_t *WAV_DIE;
  116. sound_t *WAV_ENTITY[10];
  117. #endif
  118.  
  119.  
  120. /*
  121.  * local vars
  122.  */
  123. static U8 isave_frow;
  124. static game_state_t game_state;
  125. #ifdef ENABLE_SOUND
  126. static sound_t *music_snd;
  127. #endif
  128.  
  129.  
  130. /*
  131.  * prototypes
  132.  */
  133. static void frame(void);
  134. static void init(void);
  135. static void play0(void);
  136. static void play3(void);
  137. static void restart(void);
  138. static void isave(void);
  139. static void irestore(void);
  140. static void loaddata(void);
  141. static void freedata(void);
  142.  
  143.  
  144. /*
  145.  * Cheats
  146.  */
  147. #ifdef ENABLE_CHEATS
  148. void
  149. game_toggleCheat(U8 nbr)
  150. {
  151.   if (game_state != INTRO_MAIN && game_state != INTRO_MAP &&
  152.       game_state != GAMEOVER && game_state != GETNAME &&
  153. #ifdef ENABLE_DEVTOOLS
  154.       game_state != DEVTOOLS &&
  155. #endif
  156.       game_state != XRICK && game_state != EXIT) {
  157.     switch (nbr) {
  158.     case 1:
  159.       game_cheat1 = ~game_cheat1;
  160.       game_lives = 6;
  161.       game_bombs = 6;
  162.       game_bullets = 6;
  163.       break;
  164.     case 2:
  165.       game_cheat2 = ~game_cheat2;
  166.       break;
  167.     case 3:
  168.       game_cheat3 = ~game_cheat3;
  169.       break;
  170.     }
  171.     draw_infos();
  172.     /* FIXME this should probably only raise a flag ... */
  173.     /* plus we only need to update INFORECT not the whole screen */
  174.     sysvid_update(&draw_SCREENRECT);
  175.   }
  176. }
  177. #endif
  178.  
  179. #ifdef ENABLE_SOUND
  180. /*
  181.  * Music
  182.  */
  183. void
  184. game_setmusic(char *name, U8 loop)
  185. {
  186.     U8 channel;
  187.  
  188.     if (music_snd)
  189.         game_stopmusic();
  190.     music_snd = syssnd_load(name);
  191.     if (music_snd)
  192.     {
  193.         music_snd->dispose = TRUE; /* music is always "fire and forget" */
  194.         channel = syssnd_play(music_snd, loop);
  195.     }
  196. }
  197.  
  198. void
  199. game_stopmusic(void)
  200. {
  201.     syssnd_stopsound(music_snd);
  202.     music_snd = NULL;
  203. }
  204. #endif
  205.  
  206. /*
  207.  * Main loop
  208.  */
  209. void
  210. game_run(void)
  211. {
  212.   U32 tm, tmx;
  213.  
  214.     loaddata(); /* load cached data */
  215.  
  216.     game_period = sysarg_args_period ? sysarg_args_period : GAME_PERIOD;
  217.     tm = sys_gettime();
  218.     game_state = XRICK;
  219.  
  220.     /* main loop */
  221.     while (game_state != EXIT) {
  222.  
  223.         /* timer */
  224.         tmx = tm; tm = sys_gettime(); tmx = tm - tmx;
  225.         if (tmx < game_period) sys_sleep(game_period - tmx);
  226.  
  227.         /* video */
  228.         /*DEBUG*//*game_rects=&draw_SCREENRECT;*//*DEBUG*/
  229.         sysvid_update(game_rects);
  230.         draw_STATUSRECT.next = NULL;  /* FIXME freerects should handle this */
  231.  
  232.         /* sound */
  233.         /*snd_mix();*/
  234.  
  235.         /* events */
  236.         if (game_waitevt)
  237.             sysevt_wait();  /* wait for an event */
  238.         else
  239.             sysevt_poll();  /* process events (non-blocking) */
  240.  
  241.         /* frame */
  242.         frame();
  243.     }
  244.  
  245.     freedata(); /* free cached data */
  246. }
  247.  
  248. /*
  249.  * Prepare frame
  250.  *
  251.  * This function loops forever: use 'return' when a frame is ready.
  252.  * When returning, game_rects must contain every parts of the buffer
  253.  * that have been modified.
  254.  */
  255. static void
  256. frame(void)
  257. {
  258.     while (1) {
  259.  
  260.         switch (game_state) {
  261.  
  262.  
  263.  
  264. #ifdef ENABLE_DEVTOOLS
  265.         case DEVTOOLS:
  266.             switch (devtools_run()) {
  267.             case SCREEN_RUNNING:
  268.                 return;
  269.             case SCREEN_DONE:
  270.                 game_state = INIT_GAME;
  271.                 break;
  272.             case SCREEN_EXIT:
  273.                 game_state = EXIT;
  274.                 return;
  275.             }
  276.         break;
  277. #endif
  278.  
  279.  
  280.  
  281.         case XRICK:
  282.             switch(screen_xrick()) {
  283.             case SCREEN_RUNNING:
  284.                 return;
  285.             case SCREEN_DONE:
  286. #ifdef ENABLE_DEVTOOLS
  287.                 game_state = DEVTOOLS;
  288. #else
  289.                 game_state = INIT_GAME;
  290. #endif
  291.                 break;
  292.             case SCREEN_EXIT:
  293.                 game_state = EXIT;
  294.                 return;
  295.             }
  296.         break;
  297.  
  298.  
  299.  
  300.         case INIT_GAME:
  301.             init();
  302.             game_state = INTRO_MAIN;
  303.             break;
  304.  
  305.  
  306.  
  307.         case INTRO_MAIN:
  308.             switch (screen_introMain()) {
  309.             case SCREEN_RUNNING:
  310.                 return;
  311.             case SCREEN_DONE:
  312.                 game_state = INTRO_MAP;
  313.                 break;
  314.             case SCREEN_EXIT:
  315.                 game_state = EXIT;
  316.                 return;
  317.             }
  318.         break;
  319.  
  320.  
  321.  
  322.         case INTRO_MAP:
  323.             switch (screen_introMap()) {
  324.             case SCREEN_RUNNING:
  325.                 return;
  326.             case SCREEN_DONE:
  327.                 game_waitevt = FALSE;
  328.                 game_state = INIT_BUFFER;
  329.                 break;
  330.             case SCREEN_EXIT:
  331.                 game_state = EXIT;
  332.                 return;
  333.             }
  334.         break;
  335.  
  336.  
  337.  
  338.         case INIT_BUFFER:
  339.             sysvid_clear();                 /* clear buffer */
  340.             draw_map();                     /* draw the map onto the buffer */
  341.             draw_drawStatus();              /* draw the status bar onto the buffer */
  342. #ifdef ENABLE_CHEATS
  343.             draw_infos();                   /* draw the info bar onto the buffer */
  344. #endif
  345.             game_rects = &draw_SCREENRECT;  /* request full buffer refresh */
  346.             game_state = PLAY0;
  347.             return;
  348.  
  349.  
  350.  
  351.         case PAUSE_PRESSED1:
  352.             screen_pause(TRUE);
  353.             game_state = PAUSE_PRESSED1B;
  354.             break;
  355.  
  356.  
  357.  
  358.         case PAUSE_PRESSED1B:
  359.             if (control_status & CONTROL_PAUSE)
  360.                 return;
  361.             game_state = PAUSED;
  362.             break;
  363.  
  364.  
  365.  
  366.         case PAUSED:
  367.             if (control_status & CONTROL_PAUSE)
  368.                 game_state = PAUSE_PRESSED2;
  369.             if (control_status & CONTROL_EXIT)
  370.                 game_state = EXIT;
  371.             return;
  372.  
  373.  
  374.  
  375.         case PAUSE_PRESSED2:
  376.             if (!(control_status & CONTROL_PAUSE)) {
  377.                 game_waitevt = FALSE;
  378.                 screen_pause(FALSE);
  379. #ifdef ENABLE_SOUND
  380.                 syssnd_pause(FALSE, FALSE);
  381. #endif
  382.                 game_state = PLAY2;
  383.             }
  384.         return;
  385.  
  386.  
  387.  
  388.         case PLAY0:
  389.             play0();
  390.             break;
  391.  
  392.  
  393.  
  394.         case PLAY1:
  395.             if (control_status & CONTROL_PAUSE) {
  396. #ifdef ENABLE_SOUND
  397.                 syssnd_pause(TRUE, FALSE);
  398. #endif
  399.                 game_waitevt = TRUE;
  400.                 game_state = PAUSE_PRESSED1;
  401.             }
  402.             else if (control_active == FALSE) {
  403. #ifdef ENABLE_SOUND
  404.                 syssnd_pause(TRUE, FALSE);
  405. #endif
  406.                 game_waitevt = TRUE;
  407.                 screen_pause(TRUE);
  408.                 game_state = PAUSED;
  409.             }
  410.             else
  411.                 game_state = PLAY2;
  412.             break;
  413.  
  414.  
  415.  
  416.         case PLAY2:
  417.             if E_RICK_STTST(E_RICK_STDEAD) {  /* rick is dead */
  418.                 if (game_cheat1 || --game_lives) {
  419.                     game_state = RESTART;
  420.                 } else {
  421.                     game_state = GAMEOVER;
  422.                 }
  423.             }
  424.             else if (game_chsm)  /* request to chain to next submap */
  425.                 game_state = CHAIN_SUBMAP;
  426.             else
  427.                 game_state = PLAY3;
  428.             break;
  429.  
  430.  
  431.  
  432.     case PLAY3:
  433.       play3();
  434.       return;
  435.  
  436.  
  437.  
  438.     case CHAIN_SUBMAP:
  439.       if (map_chain())
  440.     game_state = CHAIN_END;
  441.       else {
  442.     game_bullets = 0x06;
  443.     game_bombs = 0x06;
  444.     game_map++;
  445.  
  446.     if (game_map == 0x04) {
  447.       /* reached end of game */
  448.       /* FIXME @292?*/
  449.     }
  450.  
  451.     game_state = CHAIN_MAP;
  452.       }
  453.       break;
  454.  
  455.  
  456.  
  457.     case CHAIN_MAP:                             /* CHAIN MAP */
  458.       switch (screen_introMap()) {
  459.       case SCREEN_RUNNING:
  460.     return;
  461.       case SCREEN_DONE:
  462.     if (game_map >= 0x04) {  /* reached end of game */
  463.       sysarg_args_map = 0;
  464.       sysarg_args_submap = 0;
  465.       game_state = GAMEOVER;
  466.     }
  467.     else {  /* initialize game */
  468.       ent_ents[1].x = map_maps[game_map].x;
  469.       ent_ents[1].y = map_maps[game_map].y;
  470.       map_frow = (U8)map_maps[game_map].row;
  471.       game_submap = map_maps[game_map].submap;
  472.       game_state = CHAIN_END;
  473.     }
  474.     break;
  475.       case SCREEN_EXIT:
  476.     game_state = EXIT;
  477.     return;
  478.       }
  479.       break;
  480.  
  481.  
  482.  
  483.     case CHAIN_END:
  484.       map_init();                     /* initialize the map */
  485.       isave();                        /* save data in case of a restart */
  486.       ent_clprev();                   /* cleanup entities */
  487.       draw_map();                     /* draw the map onto the buffer */
  488.       draw_drawStatus();              /* draw the status bar onto the buffer */
  489.       game_rects = &draw_SCREENRECT;  /* request full screen refresh */
  490.       game_state = PLAY3;
  491.       return;
  492.  
  493.  
  494.  
  495.     case SCROLL_UP:
  496.       switch (scroll_up()) {
  497.       case SCROLL_RUNNING:
  498.     return;
  499.       case SCROLL_DONE:
  500.     game_state = PLAY0;
  501.     break;
  502.       }
  503.       break;
  504.  
  505.  
  506.  
  507.     case SCROLL_DOWN:
  508.       switch (scroll_down()) {
  509.       case SCROLL_RUNNING:
  510.     return;
  511.       case SCROLL_DONE:
  512.     game_state = PLAY0;
  513.     break;
  514.       }
  515.       break;
  516.  
  517.  
  518.  
  519.     case RESTART:
  520.       restart();
  521.       game_state = PLAY0;
  522.       return;
  523.  
  524.  
  525.  
  526.     case GAMEOVER:
  527.       switch (screen_gameover()) {
  528.       case SCREEN_RUNNING:
  529.     return;
  530.       case SCREEN_DONE:
  531.     game_state = GETNAME;
  532.     break;
  533.       case SCREEN_EXIT:
  534.     game_state = EXIT;
  535.     break;
  536.       }
  537.       break;
  538.  
  539.  
  540.  
  541.     case GETNAME:
  542.       switch (screen_getname()) {
  543.       case SCREEN_RUNNING:
  544.     return;
  545.       case SCREEN_DONE:
  546.     game_state = INIT_GAME;
  547.     return;
  548.       case SCREEN_EXIT:
  549.     game_state = EXIT;
  550.     break;
  551.       }
  552.       break;
  553.  
  554.  
  555.  
  556.     case EXIT:
  557.       return;
  558.  
  559.     }
  560.   }
  561. }
  562.  
  563.  
  564. /*
  565.  * Initialize the game
  566.  */
  567. static void
  568. init(void)
  569. {
  570.   U8 i;
  571.  
  572.   E_RICK_STRST(0xff);
  573.  
  574.   game_lives = 6;
  575.   game_bombs = 6;
  576.   game_bullets = 6;
  577.   game_score = 0;
  578.  
  579.   game_map = sysarg_args_map;
  580.  
  581.   if (sysarg_args_submap == 0) {
  582.     game_submap = map_maps[game_map].submap;
  583.     map_frow = (U8)map_maps[game_map].row;
  584.   }
  585.   else {
  586.     /* dirty hack to determine frow */
  587.     game_submap = sysarg_args_submap;
  588.     i = 0;
  589.     while (i < MAP_NBR_CONNECT &&
  590.        (map_connect[i].submap != game_submap ||
  591.         map_connect[i].dir != RIGHT))
  592.       i++;
  593.     map_frow = map_connect[i].rowin - 0x10;
  594.     ent_ents[1].y = 0x10 << 3;
  595.   }
  596.  
  597.   ent_ents[1].x = map_maps[game_map].x;
  598.   ent_ents[1].y = map_maps[game_map].y;
  599.   ent_ents[1].w = 0x18;
  600.   ent_ents[1].h = 0x15;
  601.   ent_ents[1].n = 0x01;
  602.   ent_ents[1].sprite = 0x01;
  603.   ent_ents[1].front = FALSE;
  604.   ent_ents[ENT_ENTSNUM].n = 0xFF;
  605.  
  606.   map_resetMarks();
  607.  
  608.   map_init();
  609.   isave();
  610. }
  611.  
  612.  
  613. /*
  614.  * play0
  615.  *
  616.  */
  617. static void
  618. play0(void)
  619. {
  620.   if (control_status & CONTROL_END) {  /* request to end the game */
  621.     game_state = GAMEOVER;
  622.     return;
  623.   }
  624.  
  625.   if (control_last == CONTROL_EXIT) {  /* request to exit the game */
  626.     game_state = EXIT;
  627.     return;
  628.   }
  629.  
  630.   ent_action();      /* run entities */
  631.   e_them_rndseed++;  /* (0270) */
  632.  
  633.   game_state = PLAY1;
  634. }
  635.  
  636.  
  637. /*
  638.  * play3
  639.  *
  640.  */
  641. static void
  642. play3(void)
  643. {
  644.   static rect_t *r;
  645.  
  646.   draw_clearStatus();  /* clear the status bar */
  647.   ent_draw();          /* draw all entities onto the buffer */
  648.   /* sound */
  649.   draw_drawStatus();   /* draw the status bar onto the buffer*/
  650.  
  651.   r = &draw_STATUSRECT; r->next = ent_rects;  /* refresh status bar too */
  652.   game_rects = r;  /* take care to cleanup draw_STATUSRECT->next later! */
  653.  
  654.   if (!E_RICK_STTST(E_RICK_STZOMBIE)) {  /* need to scroll ? */
  655.     if (ent_ents[1].y >= 0xCC) {
  656.       game_state = SCROLL_UP;
  657.       return;
  658.     }
  659.     if (ent_ents[1].y <= 0x60) {
  660.       game_state = SCROLL_DOWN;
  661.       return;
  662.     }
  663.   }
  664.  
  665.   game_state = PLAY0;
  666. }
  667.  
  668.  
  669. /*
  670.  * restart
  671.  *
  672.  */
  673. static void
  674. restart(void)
  675. {
  676.   E_RICK_STRST(E_RICK_STDEAD|E_RICK_STZOMBIE);
  677.  
  678.   game_bullets = 6;
  679.   game_bombs = 6;
  680.  
  681.   ent_ents[1].n = 1;
  682.  
  683.   irestore();
  684.   map_init();
  685.   isave();
  686.   ent_clprev();
  687.   draw_map();
  688.   draw_drawStatus();
  689.   game_rects = &draw_SCREENRECT;
  690. }
  691.  
  692.  
  693. /*
  694.  * isave (0bbb)
  695.  *
  696.  */
  697. static void
  698. isave(void)
  699. {
  700.   e_rick_save();
  701.   isave_frow = map_frow;
  702. }
  703.  
  704.  
  705. /*
  706.  * irestore (0bdc)
  707.  *
  708.  */
  709. static void
  710. irestore(void)
  711. {
  712.   e_rick_restore();
  713.   map_frow = isave_frow;
  714. }
  715.  
  716. /*
  717.  *
  718.  */
  719. static void
  720. loaddata()
  721. {
  722. #ifdef ENABLE_SOUND
  723.     /*
  724.      * Cache sounds
  725.      *
  726.      * tune[0-5].wav not cached
  727.      */
  728.     WAV_GAMEOVER = syssnd_load("sounds/gameover.wav");
  729.     WAV_SBONUS2 = syssnd_load("sounds/sbonus2.wav");
  730.     WAV_BULLET = syssnd_load("sounds/bullet.wav");
  731.     WAV_BOMBSHHT = syssnd_load("sounds/bombshht.wav");
  732.     WAV_EXPLODE = syssnd_load("sounds/explode.wav");
  733.     WAV_STICK = syssnd_load("sounds/stick.wav");
  734.     WAV_WALK = syssnd_load("sounds/walk.wav");
  735.     WAV_CRAWL = syssnd_load("sounds/crawl.wav");
  736.     WAV_JUMP = syssnd_load("sounds/jump.wav");
  737.     WAV_PAD = syssnd_load("sounds/pad.wav");
  738.     WAV_BOX = syssnd_load("sounds/box.wav");
  739.     WAV_BONUS = syssnd_load("sounds/bonus.wav");
  740.     WAV_SBONUS1 = syssnd_load("sounds/sbonus1.wav");
  741.     WAV_DIE = syssnd_load("sounds/die.wav");
  742.     WAV_ENTITY[0] = syssnd_load("sounds/ent0.wav");
  743.     WAV_ENTITY[1] = syssnd_load("sounds/ent1.wav");
  744.     WAV_ENTITY[2] = syssnd_load("sounds/ent2.wav");
  745.     WAV_ENTITY[3] = syssnd_load("sounds/ent3.wav");
  746.     WAV_ENTITY[4] = syssnd_load("sounds/ent4.wav");
  747.     WAV_ENTITY[5] = syssnd_load("sounds/ent5.wav");
  748.     WAV_ENTITY[6] = syssnd_load("sounds/ent6.wav");
  749.     WAV_ENTITY[7] = syssnd_load("sounds/ent7.wav");
  750.     WAV_ENTITY[8] = syssnd_load("sounds/ent8.wav");
  751. #endif
  752. }
  753.  
  754. /*
  755.  *
  756.  */
  757. static void
  758. freedata()
  759. {
  760. #ifdef ENABLE_SOUND
  761.     syssnd_stopall();
  762.     syssnd_free(WAV_GAMEOVER);
  763.     syssnd_free(WAV_SBONUS2);
  764.     syssnd_free(WAV_BULLET);
  765.     syssnd_free(WAV_BOMBSHHT);
  766.     syssnd_free(WAV_EXPLODE);
  767.     syssnd_free(WAV_STICK);
  768.     syssnd_free(WAV_WALK);
  769.     syssnd_free(WAV_CRAWL);
  770.     syssnd_free(WAV_JUMP);
  771.     syssnd_free(WAV_PAD);
  772.     syssnd_free(WAV_BOX);
  773.     syssnd_free(WAV_BONUS);
  774.     syssnd_free(WAV_SBONUS1);
  775.     syssnd_free(WAV_DIE);
  776.     syssnd_free(WAV_ENTITY[0]);
  777.     syssnd_free(WAV_ENTITY[1]);
  778.     syssnd_free(WAV_ENTITY[2]);
  779.     syssnd_free(WAV_ENTITY[3]);
  780.     syssnd_free(WAV_ENTITY[4]);
  781.     syssnd_free(WAV_ENTITY[5]);
  782.     syssnd_free(WAV_ENTITY[6]);
  783.     syssnd_free(WAV_ENTITY[7]);
  784.     syssnd_free(WAV_ENTITY[8]);
  785. #endif
  786. }
  787.  
  788.  
  789. /* eof */
  790.